set(__NXOS_BUILD_ARCH x86)
set(__NXOS_BUILD_PROCESSOR i686)
set(__NXOS_BUILD_TARGET_TRIPLE i686-unknown-gnu-elf)

include(${CMAKE_CURRENT_LIST_DIR}/common.cmake)

set(CMAKE_SIZEOF_VOID_P 4)

add_definitions(-U__unix__ -U__unix -Uunix -U__GLIBC__ -U__GNU__ -U__MACH__ -U__gnu_hurd__)
add_compile_options(-march=i686 -m32)
add_link_options(-march=i686 -m32)
add_link_options(-nostartfiles)

# todo: support dynamic link
add_link_options(-Wl,-no-dynamic-linker)
